function Solve(params)
{
    params = params.map(Number);

    var N = parseInt(params[0]);
    params.shift();

    var answer = 1;
    var isSequence = false;

    for (var i = 1; i < params.length; i++)
    {
        if (params[i] < params[i-1])
        {
            answer++;
        }
    }

    return answer;
}

var input = [
    '7',
    '1',
    '2',
    '-3',
    '4',
    '4',
    '0',
    '1'
];

console.log(Solve(input));